<template>
	<view :class="hoxshaow?'box-shadow ':''" >
		<view class="navbar-fixed"  :class="hoxshaow?'bgColor-white':''">
			<!-- 状态栏小程序撑起高度 -->
			<view :style="{height:statusBarHeight+'px'}"></view>
			<view class="d-flex aling-centen pl-30" :style="{height:navBarHeight+'px',width:windowWidth+'px'}">
				
				<text class="" style="font-size: 36rpx;" :style="{color}">{{text}}</text>
			</view>
		</view>
		<!-- 需要添加占位符高度  状态栏高度+导航栏高度（否则下面tab会塌陷）-->
		<view :style="{height:statusBarHeight+navBarHeight+'px'}" :class="hoxshaow?'bgColor-white':''"></view>
	</view>
</template>
<script>
	import {mapGetters} from 'vuex'
	export default {
		name:'x-navTitle',
		props:{
			text:{
				type:String,
				default:'请传递内容'
			},
			color:{
				type:String,
				default:'#fff'
			},
			hoxshaow:{
				type:Boolean,
				default:false
			}
		},
		data() {
			return {
				
			}
		},
		computed:{
			...mapGetters(['statusBarHeight','navBarHeight','windowWidth']),
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
.navbar-fixed {
			position: fixed;
			top: 0;
			left: 0;
			z-index: 99;
			width: 100%;
			

		}
</style>

